address and host name; for example, 192.168.1.195 debian
127.0.0.1 is the loop address. For example, if we do not want other machines in the LAN to see the network program we are testing, we can use the loop address for testing. Why do I need to define a domain name? In fact, it is easy to understand. For example, we have three hosts, each of which does different things. One is a MAIL server, the other is an FTP server, and the other is an SMB server
---smallfry ping statistics---
2 packets transmitted, 2 received, 0% packet loss, time 2017ms
RTT Min/avg/max/mdev = 0.034/0.092/0.197/0.074 ms, pipe 2
[Root@bigboy tmp]#
You can also add aliases to the "end of the" which enable you to refer to the server using other names. Here we are have set it up so this smallfry can also be accessed using the names Tiny and Littleguy.
192.168.1.101 smallfry Tiny Littleguy
You should never have a IP address more than once in this file because
Modify the Hosts file, vi/etc/hosts, generally can not remove the localhost, removed after zookeeper and other frameworks may be problematic, as follows:
1234
127.0.0.1localhost.localdomainlocalhost192.168.1.91master192.168.1.93slave1192.168.1.94slave2
192.168.1.91 is both native localLinux modifies the native alias/
1. The phenomenon of problems
Host name (hostname) is displayed as unknown
2. How to Solve
My environment is for unknown, one is not set host name, two are using DHCP assigned IP mode
The workaround steps are described below:
First procedure: Modifying the hostname configuration file and creating a new node file
Vi/etc/h
1, about/etc/host, hostname and IP configuration file Hosts-the static table lookup for host name (host-Name query-still tables) Hosts file is a Linux system responsible for the rapid resolution of IP address and domain name files, in ASCII format in the "/
Modify/etc/hosts. allow and/etc/hosts. deny allows linux servers to allow and restrict access to network services that can be started using xinetd programs, such as ftp telnet. We can modify/etc/
Reference: http://wp.fungo.me/linux/what-the-hell-is-hostname.htmlHostname is the machine name, a variable in the kernel, can be temporarily modified or permanently modified/etc/hosts The local DNS system, query the domain name will be first in this file inside the query, can not find the system DNS to findSo hostname
1, about/etc/host, hostname and IP configuration fileHosts-the static table lookup for host name (host-Name query-still tables)The Hosts file is a file that is responsible for the fast resolution of IP addresses and domain names in the Linux system, and is stored in the "/etc
corresponding IP, domain name is usually used on the internet, However, if the computer does not want to use the domain name resolution on the Internet, you can change the hosts file to join your own domain name resolution. 4. /hosts files can help troubleshoot issues 4.1 Telnet to a Linux host too slow Sometimes the client wants to telnet to a
Linux/etc/hosts file function 1. for details about/etc/host, host name and IP configuration file Hosts: Thestatictablelookupforhostname (host name query static table) in Linux,/etc/
Directory structure
Directory structure
Hosts file
Hosts format configuration
Hosts file format
Hosts file role
Hosts fileHosts--the static table lookup for host name (host name query for still tables).The
Modify/etc/hosts in Linux and etchosts in linuxDirectory structure
Directory structure
Hosts file
Hosts format Configuration
Hosts file format
Hosts file Function
26.3 "Linux Learning is not difficult " Linux network configuration file (3):/etc/hosts fileWhen the computer starts, the computer needs to query for some hostname-to-IP address matching before DNS can be queried. These matching information is stored in the/
Windows domain name Local resolution file hosts is able to have a domain name on multiple IPs, if there is a problem with IP, can go to resolve to other IPLinux local parsing file/etc/hosts, whether it can also do so. Here's a test.Let's take a look at #解析器查询顺序配置文件cat /etc/h
Hosts file hosts -- the static table lookup for host name (host name query static table) hosts file is a file on the Linux System for fast resolution of IP addresses and domain names, save it in the/etc/directory in ASCII format. The hos
We usually know the hosts file in Windows (C:\WINDOWS\SYSTEM32\DRIVERS\ETC), which is used to map the domain name.Of course there are Linux, usually under the/etc/hosts.When working on the project, in the development machine, there are various domain name jumps at the time. Sometimes the file cannot be found, it is pos
Use:Associating host names and IP addressesAt the start of the machine, before the DNS works, you need to know some of the host name and IP address mapping, the mapping relationship is stored in the/etc/hosts file, the DNS does not work properly, all network programs in the system will view the file to determine the IP address corresponding to the host name.Format:One IP address per lineIP_Address Canonical
Tags: hang not COM hosts browser pre Inter local. comThere is a/etc/hosts file below the Unix system, on my Mac, the contents of this file are as follows:# # # Host database## localhost is used to configure the loopback interface# when the system is booting. don't change this entry.##127.0. 0.1 localhost255.255. 255.255 broadcasthost::1 local
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.